home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / linuxcon.000 / linuxcon / linuxconf-1.6 / misc / error.c < prev    next >
C/C++ Source or Header  |  1996-06-25  |  727b  |  42 lines

  1. #include "misc.h"
  2. #include "misc.m"
  3.  
  4. /*
  5.     Print an error message in a popup
  6. */
  7. static void xconf_msg (
  8.     const char *title,
  9.     const char *icon,
  10.     const char *msg,
  11.     va_list list)
  12. {
  13.     char buf[2000];
  14.     vsprintf (buf,msg,list);
  15.     dialog_clear();
  16.     dialog_msgbox ((char*)title,buf,icon);
  17. }
  18. /*
  19.     Print an error message in a popup
  20. */
  21. void xconf_error (const char *msg, ...)
  22. {
  23.     va_list list;
  24.     va_start (list,msg);
  25.     html_setpopup();
  26.     xconf_msg (MSG_U(T_ERROR,"Error"),MSG_U(I_ICONERROR,"Error"),msg,list);
  27.     va_end (list);
  28. }
  29.  
  30. /*
  31.     Print a notice to the user.
  32. */
  33. void xconf_notice (const char *msg, ...)
  34. {
  35.     va_list list;
  36.     va_start (list,msg);
  37.     xconf_msg (MSG_U(T_PLEASE,"Please note")
  38.         ,MSG_U(I_ICONNOTICE,"Notice"),msg,list);
  39.     va_end (list);
  40. }
  41.  
  42.